package org.bit.lesson07;

public class Demo_702 {
    public static void main(String[] args) throws InterruptedException {
        MyBlockingQueue queue = new MyBlockingQueue(3);
        queue.put(1);
        queue.put(2);
        queue.put(3);
        System.out.println("已经入队了3个元素...");
//        queue.put(4);
//        System.out.println("已经入队了4个元素...");
        System.out.println(queue.take());
        System.out.println(queue.take());
        System.out.println(queue.take());
        System.out.println("已经取出了3个元素...");
        System.out.println(queue.take());
        System.out.println("已经取出了4个元素...");
    }
}
